/*

* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     Smart-Shop开源商城系统/ Java商城-首选电商平台系统 请务必保留此注释头信息
* |     开源地址: https://gitee.com/ningbo-qishan/gruul-mall
* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     可正常分享和学习源码,未经授权 不可商用！
* |     商业版中台购买/开源版商业授权 联系技术客服
* |     官网:  https://www.73app.cn/
* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     Copyright (c) 2016-2999 宁波启山智软科技有限公司
* |     版权所有 ,侵权必究！
* ------------------------------------------------------------------------

*/
package com.medusa.gruul.discount.api.model.dto.manager;

import cn.hutool.core.bean.BeanUtil;
import com.medusa.gruul.discount.api.entity.MemberCoupon;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.util.Date;

/**
 *
 * 客户优惠劵
 *
 * @author lcysike
 * @since 2019-12-09
 */
@Data
@ApiModel(value = "新增或修改客户优惠劵信息DTO")
public class MemberCouponDto {

	private Long id;

	@ApiModelProperty(value = "优惠劵id")
	@NotBlank(message = "分类名称不能为空")
	private Long couponId;

	@ApiModelProperty(value = "有效类型： 0-固定时间  1-领劵立即生效")
	@NotBlank(message = "有效类型不能为空")
	private Integer effectiveType;

	@ApiModelProperty(value = "有效天数")
	private Integer effectiveDays;

	@ApiModelProperty(value = "开始时间")
	private Date startTime;

	@ApiModelProperty(value = "结束时间")
	private Date endTime;

	@ApiModelProperty(value = "适用商品：  0-全部商品参与  1-指定商品参与  2-指定商品不参与")
	@NotBlank(message = "适用商品类型不能为空")
	private Integer productType;

	@ApiModelProperty(value = "优惠劵类型：  0-无门槛折扣劵  1-无门槛现金劵  2-满折劵  3-满减劵")
	@NotBlank(message = "优惠劵类型不能为空")
	private Integer couponType;

	@ApiModelProperty(value = "优惠折扣（不能大于10）")
	private BigDecimal discount;

	@ApiModelProperty(value = "优惠金额")
	private BigDecimal discountAmount;

	@ApiModelProperty(value = "满足条件金额")
	private BigDecimal conditionAmount;

	@ApiModelProperty(value = "发行数量")
	@NotBlank(message = "发行数量不能为空")
	private Integer issueQuantity;

	@ApiModelProperty(value = "限领(张/人)")
	@NotBlank(message = "限领张数不能为空")
	private Integer limitQuantity;

	@ApiModelProperty(value = "优惠劵状态：  0-未开始  1-进行中  2-已结束")
	private Integer status;

	@ApiModelProperty(value = "赠送类型：  0-全民活动  1-赠予客户  2-积分优惠劵")
	private Integer giveType;

	@ApiModelProperty(value = "所需积分")
	private Integer integral;

	public MemberCoupon coverMemberCoupon() {
		MemberCoupon memberCoupon = new MemberCoupon();
		BeanUtil.copyProperties(this, memberCoupon);
		return memberCoupon;
	}


}
